package com.stars.empoly.adapter;

import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.stars.empoly.R;
import com.stars.empoly.databinding.ItemCarChoseBinding;
import com.stars.empoly.model.TypeGet;
import com.stars.empoly.vmodel.AuthDriverVModel;
import com.trailer.base.base.BAdapter;


import org.jetbrains.annotations.NotNull;

public class CarAdapter extends BAdapter<TypeGet, BaseDataBindingHolder<ItemCarChoseBinding>> {

    private AuthDriverVModel vm;

    public CarAdapter(AuthDriverVModel vm) {
        super(R.layout.item_car_chose, null);
        this.vm = vm;
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemCarChoseBinding> helper, TypeGet todo) {
        ItemCarChoseBinding binding = helper.getDataBinding();
        binding.setItem(todo);
        binding.setVm(vm);

    }
}
